package com.forte.deliverydao;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.OneToMany;

import com.forte.orderdao.Order;
import com.forte.shoppingcustomerdao.Address;

@Entity(name="delivery")
public class Delivery implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column
	private int deliveryId;
	
	@Column
	private String location;
	
	@Column
	private String slugLocation;
	
	@Column
	private double cost;
	
	@Column
	private String time;
	
	@OneToMany(cascade = CascadeType.ALL)
	private List<Order> order = new ArrayList<Order>();
	
	@OneToMany(cascade = CascadeType.ALL)
	private List<Address> address = new ArrayList<Address>();

	public int getDeliveryId() {
		return deliveryId;
	}

	public void setDeliveryId(int deliveryId) {
		this.deliveryId = deliveryId;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getSlugLocation() {
		return slugLocation;
	}

	public void setSlugLocation(String slugLocation) {
		this.slugLocation = slugLocation;
	}

	public double getCost() {
		return cost;
	}

	public void setCost(double cost) {
		this.cost = cost;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public List<Order> getOrder() {
		return order;
	}

	public List<Address> getAddress() {
		return address;
	}
}
